#!/bin/sh

TARGET=TouchRemocon

make

mkdir -p $TARGET.app
cp Info.plist $TARGET.app/
mv $TARGET $TARGET.app/
rm -rf $TARGET.app/.svn

rm -rf Panels/.svn
rm -rf Panels/JapaneseInput/.svn

chmod -R a+r Panels
chmod -R a+r Panels/JapaneseInput
chmod -R a+r $TARGET.app
chmod a+x Panels
chmod a+x Panels/JapaneseInput
chmod a+x $TARGET.app
chmod a+x $TARGET.app/$TARGET

zip -r $TARGET.zip $TARGET.app Panels

# source
mkdir -p $TARGET
cp *.m *.h *.psd Makefile Info.plist $TARGET
tar czf $TARGET.src.tar.gz $TARGET Panels
rm -rf $TARGET
